from rehber.sozluk.models import Konu, Yorum
from django.contrib import admin
from django.contrib.auth.models import User
from django.contrib.comments.models import Comment

class CommentInline(admin.TabularInline):
	model = Yorum
	extra = 1
	model.content_object=Konu
	fieldsets = [
        ('Yorum', {'fields': ['comment','user','submit_date','artiPuan','eksiPuan',('content_type','site')], 'classes': ['wide', 'extrapretty']}),
    ]
	radio_fields = {"site": admin.VERTICAL}



class KonuAdmin(admin.ModelAdmin):
	fieldsets = [
       (None,               {'fields': ['baslik']}),
	]
	inlines = [CommentInline]

admin.site.register(Konu, KonuAdmin)
admin.site.register(Yorum)